package com.ruoyi.flow.flow.identity.activiti.repository;

import com.ruoyi.flow.flow.identity.activiti.entity.FlowUserDeptRelation;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author wtian
 * @version 1.0
 * @since 2018/9/5 17:15
 */
public interface FlowUserDeptRelationRepository extends JpaRepository<FlowUserDeptRelation, Integer> {
    List<FlowUserDeptRelation> findByUserid(int userid);

    List<FlowUserDeptRelation> findByDeptid(int deptid);

    List<FlowUserDeptRelation> findByUseridAndDeptidIsNot(int userid, int deptid);
}
